<table id="logger_datagrid_${action_id}" ></table>
<div id="logger_datagrid_${action_id}_tb" style="padding:5px;height:auto">
	<div>
		操作员:
		<span>
			<input type="text" searcher="opName" class="easyui-validatebox" style="line-height: 20px" /> 
		</span>&nbsp;&nbsp;
		日志时间 从: <input  searcher="startDate" class="easyui-datebox" style="width:100px">
		至: <input searcher="endDate" class="easyui-datebox" style="width:100px">
	</div>
	<div style="margin-top: 5px;">
		关键字:
		<span>
			<input type="text" searcher="keywords" class="easyui-validatebox" style="line-height: 20px" /> 
		</span>&nbsp;&nbsp;
		目标函数:
		<select class="easyui-combogrid" searcher="methodId" style="width:250px" data-options="
			panelWidth: 500,
			idField: 'id',
			textField: 'actionName',
			url: '${request.contextPath}${namespace?default('')}/mp/logger/method-datagrid.json',
			columns: [[
				{field:'actionName',title:'${action.getDatagridTitle('net.melon.logger.pojo.LoggerMethod','actionName')}',width:80,align:'center'},
				{field:'methodName',title:'${action.getDatagridTitle('net.melon.logger.pojo.LoggerMethod','methodName')}',width:80,align:'center'},
				{field:'level',title:'${action.getDatagridTitle('net.melon.logger.pojo.LoggerMethod','level')}',width:20,align:'center'},
			]],
			fitColumns: true
		">
		</select>
		<a href="javascript:logger_${action_id}_search();" class="easyui-linkbutton" iconCls="icon-search">查询</a>
	</div>
</div>
<script type="text/javascript">
$(function(){

	$('#logger_datagrid_${action_id}').datagrid({
		iconCls:'icon-save',
		width:'auto',
		height:'auto',
		nowrap: false,
		fit:true,
		singleSelect:true,
		fitColumns:true,
		striped: true,
		url:'${request.contextPath}${namespace?default('')}/mp/logger/logger-datagrid.json',
		sortName: 'id',
		sortOrder: 'desc',
		remoteSort: true,
		idField:'id',
		onBeforeLoad:function(){$('#logger_datagrid_${action_id}').datagrid('unselectAll');},
		columns:[[
					//{field:'ck',checkbox:true},
					{field:'operatorName',title:'${action.getDatagridTitle('operatorName')}',width:40,align:'center'},
					{field:'operatorType',title:'${action.getDatagridTitle('operatorType')}',width:40,align:'center'},
					{field:'message',title:'${action.getDatagridTitle('message')}',width:200,align:'center'},
					{field:'gmtCreate',title:'${action.getDatagridTitle('gmtCreate')}',width:80,align:'center'}
				]],
		pagination:true,
		rownumbers:true,
		toolbar:'#logger_datagrid_${action_id}_tb'
	});

});

function logger_${action_id}_search(){
	var docs = $('#logger_datagrid_${action_id}_tb').find('.easyui-combobox');
	var qp = {};
	$.each(docs,function(i,doc){
		var v = $(doc).combo('getValue');
		if(v!=''){
			qp[$(doc).attr('searcher')] = v;
		}
	});

	docs = $('#logger_datagrid_${action_id}_tb').find('.easyui-validatebox');
	$.each(docs,function(i,doc){
		var v = $(doc).val();
		if(v!=''){
			qp[$(doc).attr('searcher')] = v;
		}
	});
	
	docs = $('#logger_datagrid_${action_id}_tb').find('.easyui-datebox');
	$.each(docs,function(i,doc){
		var v = $(doc).combo('getValue');	
		if(v!=''){
			qp[$(doc).attr('searcher')] = v;
		}
	});
	
	docs = $('#logger_datagrid_${action_id}_tb').find('.easyui-combogrid');
	$.each(docs,function(i,doc){
		var v = $(doc).combo('getValue');	
		if(v!=''){
			qp[$(doc).attr('searcher')] = v;
		}
	});
	
	$('#logger_datagrid_${action_id}').datagrid('options').queryParams=qp;
	$('#logger_datagrid_${action_id}').datagrid('reload');
	
}

</script>	